package creatType.Builder;

import creatType.Builder.entity.Person;
import creatType.Builder.personbuild.IPersonBuilder;
import creatType.Builder.personbuild.impl.ManBuilderImpl;
import creatType.Builder.personbuild.impl.WomenBuilderImpl;

public class Main {

    public static void main(String[] args) {
        IPersonBuilder iBuilder = new ManBuilderImpl(new Person());
        Director director = new Director(iBuilder);
        director.build();

        Person person = iBuilder.buildPerson();
        System.out.println(person.getHead());
        System.out.println(person.getBody());
        System.out.println(person.getFoot());

        System.out.println("------------------");

        iBuilder = new WomenBuilderImpl(new Person());
        director = new Director(iBuilder);
        director.build();
        
        person = iBuilder.buildPerson();
        System.out.println(person.getHead());
        System.out.println(person.getBody());
        System.out.println(person.getFoot());
    }
}
